package Form;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Font;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

public class About extends JDialog {

	private final JPanel contentPanel = new JPanel();
	private final JPanel picsPanel = new JPanel();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
//		try {
//			About dialog = new About();
//			
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
	}

	/**
	 * Create the dialog.
	 */
	public About() {
		setBounds(400, 150, 353, 373);
		getContentPane().setLayout(null);
		JButton btnOk = new JButton("OK");
		btnOk.addKeyListener(new KeyAdapter() {
			@Override
			public void keyPressed(KeyEvent e) {
				if(e.getKeyCode() == KeyEvent.VK_ENTER)
				{
					setVisible(false);
					dispose();
				}
			}
		});
		
		btnOk.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				setVisible(false);
				dispose();
			}
		});
		btnOk.setFont(new Font("Tahoma", Font.PLAIN, 13));
		btnOk.setBounds(117, 309, 91, 23);
		getContentPane().add(btnOk);
		btnOk.requestFocus();
		
		JLabel lblGroupInformation = new JLabel("Group information :");
		lblGroupInformation.setBackground(Color.BLUE);
		lblGroupInformation.setFont(new Font("Tahoma", Font.PLAIN, 18));
		lblGroupInformation.setBounds(41, 105, 293, 24);
		getContentPane().add(lblGroupInformation);
		
		JLabel lblStudent = new JLabel("Student 704881 - Vu Thanh Nguyen");
		lblStudent.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblStudent.setBounds(51, 140, 310, 23);
		getContentPane().add(lblStudent);
		
		JLabel lblEmail = new JLabel("Email : vuthanhnguyen92@gmail.com");
		lblEmail.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblEmail.setBounds(61, 161, 293, 23);
		getContentPane().add(lblEmail);
		
		JLabel lblStudent_1 = new JLabel("Student 704880 - Tong Van Ngoan");
		lblStudent_1.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblStudent_1.setBounds(51, 187, 310, 23);
		getContentPane().add(lblStudent_1);
		
		JLabel lblEmailVanngoanuitgmailcom = new JLabel("Email : vanngoanuit@gmail.com");
		lblEmailVanngoanuitgmailcom.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblEmailVanngoanuitgmailcom.setBounds(61, 208, 293, 23);
		getContentPane().add(lblEmailVanngoanuitgmailcom);
		
		JLabel lblStudent_2 = new JLabel("Student 654485 - Pham Thi Bach Mai");
		lblStudent_2.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblStudent_2.setBounds(51, 231, 310, 23);
		getContentPane().add(lblStudent_2);
		
		JLabel lblEmailMaskymaigmailcom = new JLabel("Email : maskymai@gmail.com");
		lblEmailMaskymaigmailcom.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblEmailMaskymaigmailcom.setBounds(61, 252, 293, 23);
		getContentPane().add(lblEmailMaskymaigmailcom);
		
		ImageIcon AptechLogo = new ImageIcon("images/about_aptech_logo.jpg");
		JLabel lbAptechIcon = new JLabel("");
		lbAptechIcon.setBounds(41, 24, 150, 70);
		lbAptechIcon.setIcon(AptechLogo);
		getContentPane().add(lbAptechIcon);
		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		setVisible(true);
	}
}
